#pragma once
// MESSAGE ADRC_TUNING PACKING

#define MAVLINK_MSG_ID_ADRC_TUNING 251

MAVPACKED(
typedef struct __mavlink_adrc_tuning_t {
 uint64_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/
 float td_x1; /*< [deg/sec] Transient process for tracked signal.*/
 float td_x2; /*< [deg/sec/sec] Differential value of transient process for tracked signal.*/
 float td_r; /*<  Velocity factor.*/
 float td_h; /*<  Step factor.*/
 float td_N0; /*<  Coefficient  of step factor.*/
 float td_damp_c; /*<  Damp factor.*/
 float td_h0; /*<  The new step factor.*/
 float td_fh; /*<  Optimal differential increment of transient process for tracked signal.*/
 float eso_z1; /*<  Observed component.*/
 float eso_z2; /*<  Observed component.*/
 float eso_z3; /*<  Observed component.*/
 float eso_e; /*<  Error of state.*/
 float eso_y; /*<  System output.*/
 float eso_fe; /*<  First-order term estimator.*/
 float eso_fe1; /*<  Second-order term estimator.*/
 float eso_beta_01; /*<  First-order term factor.*/
 float eso_beta_02; /*<  Second-order term factor.*/
 float nlsef_beta0; /*<  Integral factor.*/
 float nlsef_beta1; /*<  Proportion factor.*/
 float nlsef_beta2; /*<  Differential factor.*/
 float nlsef_alpha1; /*<  Curvature factor.*/
 float nlsef_alpha2; /*<  Curvature factor.*/
 float nlsef_a; /*<  Reserved.*/
 float nlsef_b; /*<  Reserved.*/
 float nlsef_c; /*<  Reserved.*/
 uint8_t axis; /*<  Axis of antenna.*/
}) mavlink_adrc_tuning_t;

#define MAVLINK_MSG_ID_ADRC_TUNING_LEN 109
#define MAVLINK_MSG_ID_ADRC_TUNING_MIN_LEN 109
#define MAVLINK_MSG_ID_251_LEN 109
#define MAVLINK_MSG_ID_251_MIN_LEN 109

#define MAVLINK_MSG_ID_ADRC_TUNING_CRC 76
#define MAVLINK_MSG_ID_251_CRC 76



#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_ADRC_TUNING { \
    251, \
    "ADRC_TUNING", \
    27, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_adrc_tuning_t, time_boot_ms) }, \
         { "td_x1", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_adrc_tuning_t, td_x1) }, \
         { "td_x2", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_adrc_tuning_t, td_x2) }, \
         { "td_r", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_adrc_tuning_t, td_r) }, \
         { "td_h", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_adrc_tuning_t, td_h) }, \
         { "td_N0", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_adrc_tuning_t, td_N0) }, \
         { "td_damp_c", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_adrc_tuning_t, td_damp_c) }, \
         { "td_h0", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_adrc_tuning_t, td_h0) }, \
         { "td_fh", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_adrc_tuning_t, td_fh) }, \
         { "eso_z1", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_adrc_tuning_t, eso_z1) }, \
         { "eso_z2", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_adrc_tuning_t, eso_z2) }, \
         { "eso_z3", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_adrc_tuning_t, eso_z3) }, \
         { "eso_e", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_adrc_tuning_t, eso_e) }, \
         { "eso_y", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_adrc_tuning_t, eso_y) }, \
         { "eso_fe", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_adrc_tuning_t, eso_fe) }, \
         { "eso_fe1", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_adrc_tuning_t, eso_fe1) }, \
         { "eso_beta_01", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_adrc_tuning_t, eso_beta_01) }, \
         { "eso_beta_02", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_adrc_tuning_t, eso_beta_02) }, \
         { "nlsef_beta0", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_adrc_tuning_t, nlsef_beta0) }, \
         { "nlsef_beta1", NULL, MAVLINK_TYPE_FLOAT, 0, 80, offsetof(mavlink_adrc_tuning_t, nlsef_beta1) }, \
         { "nlsef_beta2", NULL, MAVLINK_TYPE_FLOAT, 0, 84, offsetof(mavlink_adrc_tuning_t, nlsef_beta2) }, \
         { "nlsef_alpha1", NULL, MAVLINK_TYPE_FLOAT, 0, 88, offsetof(mavlink_adrc_tuning_t, nlsef_alpha1) }, \
         { "nlsef_alpha2", NULL, MAVLINK_TYPE_FLOAT, 0, 92, offsetof(mavlink_adrc_tuning_t, nlsef_alpha2) }, \
         { "nlsef_a", NULL, MAVLINK_TYPE_FLOAT, 0, 96, offsetof(mavlink_adrc_tuning_t, nlsef_a) }, \
         { "nlsef_b", NULL, MAVLINK_TYPE_FLOAT, 0, 100, offsetof(mavlink_adrc_tuning_t, nlsef_b) }, \
         { "nlsef_c", NULL, MAVLINK_TYPE_FLOAT, 0, 104, offsetof(mavlink_adrc_tuning_t, nlsef_c) }, \
         { "axis", NULL, MAVLINK_TYPE_UINT8_T, 0, 108, offsetof(mavlink_adrc_tuning_t, axis) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_ADRC_TUNING { \
    "ADRC_TUNING", \
    27, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_adrc_tuning_t, time_boot_ms) }, \
         { "td_x1", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_adrc_tuning_t, td_x1) }, \
         { "td_x2", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_adrc_tuning_t, td_x2) }, \
         { "td_r", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_adrc_tuning_t, td_r) }, \
         { "td_h", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_adrc_tuning_t, td_h) }, \
         { "td_N0", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_adrc_tuning_t, td_N0) }, \
         { "td_damp_c", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_adrc_tuning_t, td_damp_c) }, \
         { "td_h0", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_adrc_tuning_t, td_h0) }, \
         { "td_fh", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_adrc_tuning_t, td_fh) }, \
         { "eso_z1", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_adrc_tuning_t, eso_z1) }, \
         { "eso_z2", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_adrc_tuning_t, eso_z2) }, \
         { "eso_z3", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_adrc_tuning_t, eso_z3) }, \
         { "eso_e", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_adrc_tuning_t, eso_e) }, \
         { "eso_y", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_adrc_tuning_t, eso_y) }, \
         { "eso_fe", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_adrc_tuning_t, eso_fe) }, \
         { "eso_fe1", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_adrc_tuning_t, eso_fe1) }, \
         { "eso_beta_01", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_adrc_tuning_t, eso_beta_01) }, \
         { "eso_beta_02", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_adrc_tuning_t, eso_beta_02) }, \
         { "nlsef_beta0", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_adrc_tuning_t, nlsef_beta0) }, \
         { "nlsef_beta1", NULL, MAVLINK_TYPE_FLOAT, 0, 80, offsetof(mavlink_adrc_tuning_t, nlsef_beta1) }, \
         { "nlsef_beta2", NULL, MAVLINK_TYPE_FLOAT, 0, 84, offsetof(mavlink_adrc_tuning_t, nlsef_beta2) }, \
         { "nlsef_alpha1", NULL, MAVLINK_TYPE_FLOAT, 0, 88, offsetof(mavlink_adrc_tuning_t, nlsef_alpha1) }, \
         { "nlsef_alpha2", NULL, MAVLINK_TYPE_FLOAT, 0, 92, offsetof(mavlink_adrc_tuning_t, nlsef_alpha2) }, \
         { "nlsef_a", NULL, MAVLINK_TYPE_FLOAT, 0, 96, offsetof(mavlink_adrc_tuning_t, nlsef_a) }, \
         { "nlsef_b", NULL, MAVLINK_TYPE_FLOAT, 0, 100, offsetof(mavlink_adrc_tuning_t, nlsef_b) }, \
         { "nlsef_c", NULL, MAVLINK_TYPE_FLOAT, 0, 104, offsetof(mavlink_adrc_tuning_t, nlsef_c) }, \
         { "axis", NULL, MAVLINK_TYPE_UINT8_T, 0, 108, offsetof(mavlink_adrc_tuning_t, axis) }, \
         } \
}
#endif

/**
 * @brief Pack a adrc_tuning message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_boot_ms [ms] Timestamp (time since system boot).
 * @param td_x1 [deg/sec] Transient process for tracked signal.
 * @param td_x2 [deg/sec/sec] Differential value of transient process for tracked signal.
 * @param td_r  Velocity factor.
 * @param td_h  Step factor.
 * @param td_N0  Coefficient  of step factor.
 * @param td_damp_c  Damp factor.
 * @param td_h0  The new step factor.
 * @param td_fh  Optimal differential increment of transient process for tracked signal.
 * @param eso_z1  Observed component.
 * @param eso_z2  Observed component.
 * @param eso_z3  Observed component.
 * @param eso_e  Error of state.
 * @param eso_y  System output.
 * @param eso_fe  First-order term estimator.
 * @param eso_fe1  Second-order term estimator.
 * @param eso_beta_01  First-order term factor.
 * @param eso_beta_02  Second-order term factor.
 * @param nlsef_beta0  Integral factor.
 * @param nlsef_beta1  Proportion factor.
 * @param nlsef_beta2  Differential factor.
 * @param nlsef_alpha1  Curvature factor.
 * @param nlsef_alpha2  Curvature factor.
 * @param nlsef_a  Reserved.
 * @param nlsef_b  Reserved.
 * @param nlsef_c  Reserved.
 * @param axis  Axis of antenna.
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_adrc_tuning_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint64_t time_boot_ms, float td_x1, float td_x2, float td_r, float td_h, float td_N0, float td_damp_c, float td_h0, float td_fh, float eso_z1, float eso_z2, float eso_z3, float eso_e, float eso_y, float eso_fe, float eso_fe1, float eso_beta_01, float eso_beta_02, float nlsef_beta0, float nlsef_beta1, float nlsef_beta2, float nlsef_alpha1, float nlsef_alpha2, float nlsef_a, float nlsef_b, float nlsef_c, uint8_t axis)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_ADRC_TUNING_LEN];
    _mav_put_uint64_t(buf, 0, time_boot_ms);
    _mav_put_float(buf, 8, td_x1);
    _mav_put_float(buf, 12, td_x2);
    _mav_put_float(buf, 16, td_r);
    _mav_put_float(buf, 20, td_h);
    _mav_put_float(buf, 24, td_N0);
    _mav_put_float(buf, 28, td_damp_c);
    _mav_put_float(buf, 32, td_h0);
    _mav_put_float(buf, 36, td_fh);
    _mav_put_float(buf, 40, eso_z1);
    _mav_put_float(buf, 44, eso_z2);
    _mav_put_float(buf, 48, eso_z3);
    _mav_put_float(buf, 52, eso_e);
    _mav_put_float(buf, 56, eso_y);
    _mav_put_float(buf, 60, eso_fe);
    _mav_put_float(buf, 64, eso_fe1);
    _mav_put_float(buf, 68, eso_beta_01);
    _mav_put_float(buf, 72, eso_beta_02);
    _mav_put_float(buf, 76, nlsef_beta0);
    _mav_put_float(buf, 80, nlsef_beta1);
    _mav_put_float(buf, 84, nlsef_beta2);
    _mav_put_float(buf, 88, nlsef_alpha1);
    _mav_put_float(buf, 92, nlsef_alpha2);
    _mav_put_float(buf, 96, nlsef_a);
    _mav_put_float(buf, 100, nlsef_b);
    _mav_put_float(buf, 104, nlsef_c);
    _mav_put_uint8_t(buf, 108, axis);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ADRC_TUNING_LEN);
#else
    mavlink_adrc_tuning_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.td_x1 = td_x1;
    packet.td_x2 = td_x2;
    packet.td_r = td_r;
    packet.td_h = td_h;
    packet.td_N0 = td_N0;
    packet.td_damp_c = td_damp_c;
    packet.td_h0 = td_h0;
    packet.td_fh = td_fh;
    packet.eso_z1 = eso_z1;
    packet.eso_z2 = eso_z2;
    packet.eso_z3 = eso_z3;
    packet.eso_e = eso_e;
    packet.eso_y = eso_y;
    packet.eso_fe = eso_fe;
    packet.eso_fe1 = eso_fe1;
    packet.eso_beta_01 = eso_beta_01;
    packet.eso_beta_02 = eso_beta_02;
    packet.nlsef_beta0 = nlsef_beta0;
    packet.nlsef_beta1 = nlsef_beta1;
    packet.nlsef_beta2 = nlsef_beta2;
    packet.nlsef_alpha1 = nlsef_alpha1;
    packet.nlsef_alpha2 = nlsef_alpha2;
    packet.nlsef_a = nlsef_a;
    packet.nlsef_b = nlsef_b;
    packet.nlsef_c = nlsef_c;
    packet.axis = axis;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ADRC_TUNING_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_ADRC_TUNING;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ADRC_TUNING_MIN_LEN, MAVLINK_MSG_ID_ADRC_TUNING_LEN, MAVLINK_MSG_ID_ADRC_TUNING_CRC);
}

/**
 * @brief Pack a adrc_tuning message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param time_boot_ms [ms] Timestamp (time since system boot).
 * @param td_x1 [deg/sec] Transient process for tracked signal.
 * @param td_x2 [deg/sec/sec] Differential value of transient process for tracked signal.
 * @param td_r  Velocity factor.
 * @param td_h  Step factor.
 * @param td_N0  Coefficient  of step factor.
 * @param td_damp_c  Damp factor.
 * @param td_h0  The new step factor.
 * @param td_fh  Optimal differential increment of transient process for tracked signal.
 * @param eso_z1  Observed component.
 * @param eso_z2  Observed component.
 * @param eso_z3  Observed component.
 * @param eso_e  Error of state.
 * @param eso_y  System output.
 * @param eso_fe  First-order term estimator.
 * @param eso_fe1  Second-order term estimator.
 * @param eso_beta_01  First-order term factor.
 * @param eso_beta_02  Second-order term factor.
 * @param nlsef_beta0  Integral factor.
 * @param nlsef_beta1  Proportion factor.
 * @param nlsef_beta2  Differential factor.
 * @param nlsef_alpha1  Curvature factor.
 * @param nlsef_alpha2  Curvature factor.
 * @param nlsef_a  Reserved.
 * @param nlsef_b  Reserved.
 * @param nlsef_c  Reserved.
 * @param axis  Axis of antenna.
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_adrc_tuning_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint64_t time_boot_ms,float td_x1,float td_x2,float td_r,float td_h,float td_N0,float td_damp_c,float td_h0,float td_fh,float eso_z1,float eso_z2,float eso_z3,float eso_e,float eso_y,float eso_fe,float eso_fe1,float eso_beta_01,float eso_beta_02,float nlsef_beta0,float nlsef_beta1,float nlsef_beta2,float nlsef_alpha1,float nlsef_alpha2,float nlsef_a,float nlsef_b,float nlsef_c,uint8_t axis)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_ADRC_TUNING_LEN];
    _mav_put_uint64_t(buf, 0, time_boot_ms);
    _mav_put_float(buf, 8, td_x1);
    _mav_put_float(buf, 12, td_x2);
    _mav_put_float(buf, 16, td_r);
    _mav_put_float(buf, 20, td_h);
    _mav_put_float(buf, 24, td_N0);
    _mav_put_float(buf, 28, td_damp_c);
    _mav_put_float(buf, 32, td_h0);
    _mav_put_float(buf, 36, td_fh);
    _mav_put_float(buf, 40, eso_z1);
    _mav_put_float(buf, 44, eso_z2);
    _mav_put_float(buf, 48, eso_z3);
    _mav_put_float(buf, 52, eso_e);
    _mav_put_float(buf, 56, eso_y);
    _mav_put_float(buf, 60, eso_fe);
    _mav_put_float(buf, 64, eso_fe1);
    _mav_put_float(buf, 68, eso_beta_01);
    _mav_put_float(buf, 72, eso_beta_02);
    _mav_put_float(buf, 76, nlsef_beta0);
    _mav_put_float(buf, 80, nlsef_beta1);
    _mav_put_float(buf, 84, nlsef_beta2);
    _mav_put_float(buf, 88, nlsef_alpha1);
    _mav_put_float(buf, 92, nlsef_alpha2);
    _mav_put_float(buf, 96, nlsef_a);
    _mav_put_float(buf, 100, nlsef_b);
    _mav_put_float(buf, 104, nlsef_c);
    _mav_put_uint8_t(buf, 108, axis);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ADRC_TUNING_LEN);
#else
    mavlink_adrc_tuning_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.td_x1 = td_x1;
    packet.td_x2 = td_x2;
    packet.td_r = td_r;
    packet.td_h = td_h;
    packet.td_N0 = td_N0;
    packet.td_damp_c = td_damp_c;
    packet.td_h0 = td_h0;
    packet.td_fh = td_fh;
    packet.eso_z1 = eso_z1;
    packet.eso_z2 = eso_z2;
    packet.eso_z3 = eso_z3;
    packet.eso_e = eso_e;
    packet.eso_y = eso_y;
    packet.eso_fe = eso_fe;
    packet.eso_fe1 = eso_fe1;
    packet.eso_beta_01 = eso_beta_01;
    packet.eso_beta_02 = eso_beta_02;
    packet.nlsef_beta0 = nlsef_beta0;
    packet.nlsef_beta1 = nlsef_beta1;
    packet.nlsef_beta2 = nlsef_beta2;
    packet.nlsef_alpha1 = nlsef_alpha1;
    packet.nlsef_alpha2 = nlsef_alpha2;
    packet.nlsef_a = nlsef_a;
    packet.nlsef_b = nlsef_b;
    packet.nlsef_c = nlsef_c;
    packet.axis = axis;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ADRC_TUNING_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_ADRC_TUNING;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ADRC_TUNING_MIN_LEN, MAVLINK_MSG_ID_ADRC_TUNING_LEN, MAVLINK_MSG_ID_ADRC_TUNING_CRC);
}

/**
 * @brief Encode a adrc_tuning struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param adrc_tuning C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_adrc_tuning_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_adrc_tuning_t* adrc_tuning)
{
    return mavlink_msg_adrc_tuning_pack(system_id, component_id, msg, adrc_tuning->time_boot_ms, adrc_tuning->td_x1, adrc_tuning->td_x2, adrc_tuning->td_r, adrc_tuning->td_h, adrc_tuning->td_N0, adrc_tuning->td_damp_c, adrc_tuning->td_h0, adrc_tuning->td_fh, adrc_tuning->eso_z1, adrc_tuning->eso_z2, adrc_tuning->eso_z3, adrc_tuning->eso_e, adrc_tuning->eso_y, adrc_tuning->eso_fe, adrc_tuning->eso_fe1, adrc_tuning->eso_beta_01, adrc_tuning->eso_beta_02, adrc_tuning->nlsef_beta0, adrc_tuning->nlsef_beta1, adrc_tuning->nlsef_beta2, adrc_tuning->nlsef_alpha1, adrc_tuning->nlsef_alpha2, adrc_tuning->nlsef_a, adrc_tuning->nlsef_b, adrc_tuning->nlsef_c, adrc_tuning->axis);
}

/**
 * @brief Encode a adrc_tuning struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param adrc_tuning C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_adrc_tuning_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_adrc_tuning_t* adrc_tuning)
{
    return mavlink_msg_adrc_tuning_pack_chan(system_id, component_id, chan, msg, adrc_tuning->time_boot_ms, adrc_tuning->td_x1, adrc_tuning->td_x2, adrc_tuning->td_r, adrc_tuning->td_h, adrc_tuning->td_N0, adrc_tuning->td_damp_c, adrc_tuning->td_h0, adrc_tuning->td_fh, adrc_tuning->eso_z1, adrc_tuning->eso_z2, adrc_tuning->eso_z3, adrc_tuning->eso_e, adrc_tuning->eso_y, adrc_tuning->eso_fe, adrc_tuning->eso_fe1, adrc_tuning->eso_beta_01, adrc_tuning->eso_beta_02, adrc_tuning->nlsef_beta0, adrc_tuning->nlsef_beta1, adrc_tuning->nlsef_beta2, adrc_tuning->nlsef_alpha1, adrc_tuning->nlsef_alpha2, adrc_tuning->nlsef_a, adrc_tuning->nlsef_b, adrc_tuning->nlsef_c, adrc_tuning->axis);
}

/**
 * @brief Send a adrc_tuning message
 * @param chan MAVLink channel to send the message
 *
 * @param time_boot_ms [ms] Timestamp (time since system boot).
 * @param td_x1 [deg/sec] Transient process for tracked signal.
 * @param td_x2 [deg/sec/sec] Differential value of transient process for tracked signal.
 * @param td_r  Velocity factor.
 * @param td_h  Step factor.
 * @param td_N0  Coefficient  of step factor.
 * @param td_damp_c  Damp factor.
 * @param td_h0  The new step factor.
 * @param td_fh  Optimal differential increment of transient process for tracked signal.
 * @param eso_z1  Observed component.
 * @param eso_z2  Observed component.
 * @param eso_z3  Observed component.
 * @param eso_e  Error of state.
 * @param eso_y  System output.
 * @param eso_fe  First-order term estimator.
 * @param eso_fe1  Second-order term estimator.
 * @param eso_beta_01  First-order term factor.
 * @param eso_beta_02  Second-order term factor.
 * @param nlsef_beta0  Integral factor.
 * @param nlsef_beta1  Proportion factor.
 * @param nlsef_beta2  Differential factor.
 * @param nlsef_alpha1  Curvature factor.
 * @param nlsef_alpha2  Curvature factor.
 * @param nlsef_a  Reserved.
 * @param nlsef_b  Reserved.
 * @param nlsef_c  Reserved.
 * @param axis  Axis of antenna.
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_adrc_tuning_send(mavlink_channel_t chan, uint64_t time_boot_ms, float td_x1, float td_x2, float td_r, float td_h, float td_N0, float td_damp_c, float td_h0, float td_fh, float eso_z1, float eso_z2, float eso_z3, float eso_e, float eso_y, float eso_fe, float eso_fe1, float eso_beta_01, float eso_beta_02, float nlsef_beta0, float nlsef_beta1, float nlsef_beta2, float nlsef_alpha1, float nlsef_alpha2, float nlsef_a, float nlsef_b, float nlsef_c, uint8_t axis)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_ADRC_TUNING_LEN];
    _mav_put_uint64_t(buf, 0, time_boot_ms);
    _mav_put_float(buf, 8, td_x1);
    _mav_put_float(buf, 12, td_x2);
    _mav_put_float(buf, 16, td_r);
    _mav_put_float(buf, 20, td_h);
    _mav_put_float(buf, 24, td_N0);
    _mav_put_float(buf, 28, td_damp_c);
    _mav_put_float(buf, 32, td_h0);
    _mav_put_float(buf, 36, td_fh);
    _mav_put_float(buf, 40, eso_z1);
    _mav_put_float(buf, 44, eso_z2);
    _mav_put_float(buf, 48, eso_z3);
    _mav_put_float(buf, 52, eso_e);
    _mav_put_float(buf, 56, eso_y);
    _mav_put_float(buf, 60, eso_fe);
    _mav_put_float(buf, 64, eso_fe1);
    _mav_put_float(buf, 68, eso_beta_01);
    _mav_put_float(buf, 72, eso_beta_02);
    _mav_put_float(buf, 76, nlsef_beta0);
    _mav_put_float(buf, 80, nlsef_beta1);
    _mav_put_float(buf, 84, nlsef_beta2);
    _mav_put_float(buf, 88, nlsef_alpha1);
    _mav_put_float(buf, 92, nlsef_alpha2);
    _mav_put_float(buf, 96, nlsef_a);
    _mav_put_float(buf, 100, nlsef_b);
    _mav_put_float(buf, 104, nlsef_c);
    _mav_put_uint8_t(buf, 108, axis);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADRC_TUNING, buf, MAVLINK_MSG_ID_ADRC_TUNING_MIN_LEN, MAVLINK_MSG_ID_ADRC_TUNING_LEN, MAVLINK_MSG_ID_ADRC_TUNING_CRC);
#else
    mavlink_adrc_tuning_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.td_x1 = td_x1;
    packet.td_x2 = td_x2;
    packet.td_r = td_r;
    packet.td_h = td_h;
    packet.td_N0 = td_N0;
    packet.td_damp_c = td_damp_c;
    packet.td_h0 = td_h0;
    packet.td_fh = td_fh;
    packet.eso_z1 = eso_z1;
    packet.eso_z2 = eso_z2;
    packet.eso_z3 = eso_z3;
    packet.eso_e = eso_e;
    packet.eso_y = eso_y;
    packet.eso_fe = eso_fe;
    packet.eso_fe1 = eso_fe1;
    packet.eso_beta_01 = eso_beta_01;
    packet.eso_beta_02 = eso_beta_02;
    packet.nlsef_beta0 = nlsef_beta0;
    packet.nlsef_beta1 = nlsef_beta1;
    packet.nlsef_beta2 = nlsef_beta2;
    packet.nlsef_alpha1 = nlsef_alpha1;
    packet.nlsef_alpha2 = nlsef_alpha2;
    packet.nlsef_a = nlsef_a;
    packet.nlsef_b = nlsef_b;
    packet.nlsef_c = nlsef_c;
    packet.axis = axis;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADRC_TUNING, (const char *)&packet, MAVLINK_MSG_ID_ADRC_TUNING_MIN_LEN, MAVLINK_MSG_ID_ADRC_TUNING_LEN, MAVLINK_MSG_ID_ADRC_TUNING_CRC);
#endif
}

/**
 * @brief Send a adrc_tuning message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_adrc_tuning_send_struct(mavlink_channel_t chan, const mavlink_adrc_tuning_t* adrc_tuning)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_adrc_tuning_send(chan, adrc_tuning->time_boot_ms, adrc_tuning->td_x1, adrc_tuning->td_x2, adrc_tuning->td_r, adrc_tuning->td_h, adrc_tuning->td_N0, adrc_tuning->td_damp_c, adrc_tuning->td_h0, adrc_tuning->td_fh, adrc_tuning->eso_z1, adrc_tuning->eso_z2, adrc_tuning->eso_z3, adrc_tuning->eso_e, adrc_tuning->eso_y, adrc_tuning->eso_fe, adrc_tuning->eso_fe1, adrc_tuning->eso_beta_01, adrc_tuning->eso_beta_02, adrc_tuning->nlsef_beta0, adrc_tuning->nlsef_beta1, adrc_tuning->nlsef_beta2, adrc_tuning->nlsef_alpha1, adrc_tuning->nlsef_alpha2, adrc_tuning->nlsef_a, adrc_tuning->nlsef_b, adrc_tuning->nlsef_c, adrc_tuning->axis);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADRC_TUNING, (const char *)adrc_tuning, MAVLINK_MSG_ID_ADRC_TUNING_MIN_LEN, MAVLINK_MSG_ID_ADRC_TUNING_LEN, MAVLINK_MSG_ID_ADRC_TUNING_CRC);
#endif
}

#if MAVLINK_MSG_ID_ADRC_TUNING_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This varient of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_adrc_tuning_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint64_t time_boot_ms, float td_x1, float td_x2, float td_r, float td_h, float td_N0, float td_damp_c, float td_h0, float td_fh, float eso_z1, float eso_z2, float eso_z3, float eso_e, float eso_y, float eso_fe, float eso_fe1, float eso_beta_01, float eso_beta_02, float nlsef_beta0, float nlsef_beta1, float nlsef_beta2, float nlsef_alpha1, float nlsef_alpha2, float nlsef_a, float nlsef_b, float nlsef_c, uint8_t axis)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint64_t(buf, 0, time_boot_ms);
    _mav_put_float(buf, 8, td_x1);
    _mav_put_float(buf, 12, td_x2);
    _mav_put_float(buf, 16, td_r);
    _mav_put_float(buf, 20, td_h);
    _mav_put_float(buf, 24, td_N0);
    _mav_put_float(buf, 28, td_damp_c);
    _mav_put_float(buf, 32, td_h0);
    _mav_put_float(buf, 36, td_fh);
    _mav_put_float(buf, 40, eso_z1);
    _mav_put_float(buf, 44, eso_z2);
    _mav_put_float(buf, 48, eso_z3);
    _mav_put_float(buf, 52, eso_e);
    _mav_put_float(buf, 56, eso_y);
    _mav_put_float(buf, 60, eso_fe);
    _mav_put_float(buf, 64, eso_fe1);
    _mav_put_float(buf, 68, eso_beta_01);
    _mav_put_float(buf, 72, eso_beta_02);
    _mav_put_float(buf, 76, nlsef_beta0);
    _mav_put_float(buf, 80, nlsef_beta1);
    _mav_put_float(buf, 84, nlsef_beta2);
    _mav_put_float(buf, 88, nlsef_alpha1);
    _mav_put_float(buf, 92, nlsef_alpha2);
    _mav_put_float(buf, 96, nlsef_a);
    _mav_put_float(buf, 100, nlsef_b);
    _mav_put_float(buf, 104, nlsef_c);
    _mav_put_uint8_t(buf, 108, axis);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADRC_TUNING, buf, MAVLINK_MSG_ID_ADRC_TUNING_MIN_LEN, MAVLINK_MSG_ID_ADRC_TUNING_LEN, MAVLINK_MSG_ID_ADRC_TUNING_CRC);
#else
    mavlink_adrc_tuning_t *packet = (mavlink_adrc_tuning_t *)msgbuf;
    packet->time_boot_ms = time_boot_ms;
    packet->td_x1 = td_x1;
    packet->td_x2 = td_x2;
    packet->td_r = td_r;
    packet->td_h = td_h;
    packet->td_N0 = td_N0;
    packet->td_damp_c = td_damp_c;
    packet->td_h0 = td_h0;
    packet->td_fh = td_fh;
    packet->eso_z1 = eso_z1;
    packet->eso_z2 = eso_z2;
    packet->eso_z3 = eso_z3;
    packet->eso_e = eso_e;
    packet->eso_y = eso_y;
    packet->eso_fe = eso_fe;
    packet->eso_fe1 = eso_fe1;
    packet->eso_beta_01 = eso_beta_01;
    packet->eso_beta_02 = eso_beta_02;
    packet->nlsef_beta0 = nlsef_beta0;
    packet->nlsef_beta1 = nlsef_beta1;
    packet->nlsef_beta2 = nlsef_beta2;
    packet->nlsef_alpha1 = nlsef_alpha1;
    packet->nlsef_alpha2 = nlsef_alpha2;
    packet->nlsef_a = nlsef_a;
    packet->nlsef_b = nlsef_b;
    packet->nlsef_c = nlsef_c;
    packet->axis = axis;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADRC_TUNING, (const char *)packet, MAVLINK_MSG_ID_ADRC_TUNING_MIN_LEN, MAVLINK_MSG_ID_ADRC_TUNING_LEN, MAVLINK_MSG_ID_ADRC_TUNING_CRC);
#endif
}
#endif

#endif

// MESSAGE ADRC_TUNING UNPACKING


/**
 * @brief Get field time_boot_ms from adrc_tuning message
 *
 * @return [ms] Timestamp (time since system boot).
 */
static inline uint64_t mavlink_msg_adrc_tuning_get_time_boot_ms(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint64_t(msg,  0);
}

/**
 * @brief Get field td_x1 from adrc_tuning message
 *
 * @return [deg/sec] Transient process for tracked signal.
 */
static inline float mavlink_msg_adrc_tuning_get_td_x1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  8);
}

/**
 * @brief Get field td_x2 from adrc_tuning message
 *
 * @return [deg/sec/sec] Differential value of transient process for tracked signal.
 */
static inline float mavlink_msg_adrc_tuning_get_td_x2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  12);
}

/**
 * @brief Get field td_r from adrc_tuning message
 *
 * @return  Velocity factor.
 */
static inline float mavlink_msg_adrc_tuning_get_td_r(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  16);
}

/**
 * @brief Get field td_h from adrc_tuning message
 *
 * @return  Step factor.
 */
static inline float mavlink_msg_adrc_tuning_get_td_h(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  20);
}

/**
 * @brief Get field td_N0 from adrc_tuning message
 *
 * @return  Coefficient  of step factor.
 */
static inline float mavlink_msg_adrc_tuning_get_td_N0(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  24);
}

/**
 * @brief Get field td_damp_c from adrc_tuning message
 *
 * @return  Damp factor.
 */
static inline float mavlink_msg_adrc_tuning_get_td_damp_c(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  28);
}

/**
 * @brief Get field td_h0 from adrc_tuning message
 *
 * @return  The new step factor.
 */
static inline float mavlink_msg_adrc_tuning_get_td_h0(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  32);
}

/**
 * @brief Get field td_fh from adrc_tuning message
 *
 * @return  Optimal differential increment of transient process for tracked signal.
 */
static inline float mavlink_msg_adrc_tuning_get_td_fh(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  36);
}

/**
 * @brief Get field eso_z1 from adrc_tuning message
 *
 * @return  Observed component.
 */
static inline float mavlink_msg_adrc_tuning_get_eso_z1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  40);
}

/**
 * @brief Get field eso_z2 from adrc_tuning message
 *
 * @return  Observed component.
 */
static inline float mavlink_msg_adrc_tuning_get_eso_z2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  44);
}

/**
 * @brief Get field eso_z3 from adrc_tuning message
 *
 * @return  Observed component.
 */
static inline float mavlink_msg_adrc_tuning_get_eso_z3(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  48);
}

/**
 * @brief Get field eso_e from adrc_tuning message
 *
 * @return  Error of state.
 */
static inline float mavlink_msg_adrc_tuning_get_eso_e(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  52);
}

/**
 * @brief Get field eso_y from adrc_tuning message
 *
 * @return  System output.
 */
static inline float mavlink_msg_adrc_tuning_get_eso_y(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  56);
}

/**
 * @brief Get field eso_fe from adrc_tuning message
 *
 * @return  First-order term estimator.
 */
static inline float mavlink_msg_adrc_tuning_get_eso_fe(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  60);
}

/**
 * @brief Get field eso_fe1 from adrc_tuning message
 *
 * @return  Second-order term estimator.
 */
static inline float mavlink_msg_adrc_tuning_get_eso_fe1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  64);
}

/**
 * @brief Get field eso_beta_01 from adrc_tuning message
 *
 * @return  First-order term factor.
 */
static inline float mavlink_msg_adrc_tuning_get_eso_beta_01(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  68);
}

/**
 * @brief Get field eso_beta_02 from adrc_tuning message
 *
 * @return  Second-order term factor.
 */
static inline float mavlink_msg_adrc_tuning_get_eso_beta_02(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  72);
}

/**
 * @brief Get field nlsef_beta0 from adrc_tuning message
 *
 * @return  Integral factor.
 */
static inline float mavlink_msg_adrc_tuning_get_nlsef_beta0(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  76);
}

/**
 * @brief Get field nlsef_beta1 from adrc_tuning message
 *
 * @return  Proportion factor.
 */
static inline float mavlink_msg_adrc_tuning_get_nlsef_beta1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  80);
}

/**
 * @brief Get field nlsef_beta2 from adrc_tuning message
 *
 * @return  Differential factor.
 */
static inline float mavlink_msg_adrc_tuning_get_nlsef_beta2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  84);
}

/**
 * @brief Get field nlsef_alpha1 from adrc_tuning message
 *
 * @return  Curvature factor.
 */
static inline float mavlink_msg_adrc_tuning_get_nlsef_alpha1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  88);
}

/**
 * @brief Get field nlsef_alpha2 from adrc_tuning message
 *
 * @return  Curvature factor.
 */
static inline float mavlink_msg_adrc_tuning_get_nlsef_alpha2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  92);
}

/**
 * @brief Get field nlsef_a from adrc_tuning message
 *
 * @return  Reserved.
 */
static inline float mavlink_msg_adrc_tuning_get_nlsef_a(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  96);
}

/**
 * @brief Get field nlsef_b from adrc_tuning message
 *
 * @return  Reserved.
 */
static inline float mavlink_msg_adrc_tuning_get_nlsef_b(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  100);
}

/**
 * @brief Get field nlsef_c from adrc_tuning message
 *
 * @return  Reserved.
 */
static inline float mavlink_msg_adrc_tuning_get_nlsef_c(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  104);
}

/**
 * @brief Get field axis from adrc_tuning message
 *
 * @return  Axis of antenna.
 */
static inline uint8_t mavlink_msg_adrc_tuning_get_axis(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  108);
}

/**
 * @brief Decode a adrc_tuning message into a struct
 *
 * @param msg The message to decode
 * @param adrc_tuning C-struct to decode the message contents into
 */
static inline void mavlink_msg_adrc_tuning_decode(const mavlink_message_t* msg, mavlink_adrc_tuning_t* adrc_tuning)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    adrc_tuning->time_boot_ms = mavlink_msg_adrc_tuning_get_time_boot_ms(msg);
    adrc_tuning->td_x1 = mavlink_msg_adrc_tuning_get_td_x1(msg);
    adrc_tuning->td_x2 = mavlink_msg_adrc_tuning_get_td_x2(msg);
    adrc_tuning->td_r = mavlink_msg_adrc_tuning_get_td_r(msg);
    adrc_tuning->td_h = mavlink_msg_adrc_tuning_get_td_h(msg);
    adrc_tuning->td_N0 = mavlink_msg_adrc_tuning_get_td_N0(msg);
    adrc_tuning->td_damp_c = mavlink_msg_adrc_tuning_get_td_damp_c(msg);
    adrc_tuning->td_h0 = mavlink_msg_adrc_tuning_get_td_h0(msg);
    adrc_tuning->td_fh = mavlink_msg_adrc_tuning_get_td_fh(msg);
    adrc_tuning->eso_z1 = mavlink_msg_adrc_tuning_get_eso_z1(msg);
    adrc_tuning->eso_z2 = mavlink_msg_adrc_tuning_get_eso_z2(msg);
    adrc_tuning->eso_z3 = mavlink_msg_adrc_tuning_get_eso_z3(msg);
    adrc_tuning->eso_e = mavlink_msg_adrc_tuning_get_eso_e(msg);
    adrc_tuning->eso_y = mavlink_msg_adrc_tuning_get_eso_y(msg);
    adrc_tuning->eso_fe = mavlink_msg_adrc_tuning_get_eso_fe(msg);
    adrc_tuning->eso_fe1 = mavlink_msg_adrc_tuning_get_eso_fe1(msg);
    adrc_tuning->eso_beta_01 = mavlink_msg_adrc_tuning_get_eso_beta_01(msg);
    adrc_tuning->eso_beta_02 = mavlink_msg_adrc_tuning_get_eso_beta_02(msg);
    adrc_tuning->nlsef_beta0 = mavlink_msg_adrc_tuning_get_nlsef_beta0(msg);
    adrc_tuning->nlsef_beta1 = mavlink_msg_adrc_tuning_get_nlsef_beta1(msg);
    adrc_tuning->nlsef_beta2 = mavlink_msg_adrc_tuning_get_nlsef_beta2(msg);
    adrc_tuning->nlsef_alpha1 = mavlink_msg_adrc_tuning_get_nlsef_alpha1(msg);
    adrc_tuning->nlsef_alpha2 = mavlink_msg_adrc_tuning_get_nlsef_alpha2(msg);
    adrc_tuning->nlsef_a = mavlink_msg_adrc_tuning_get_nlsef_a(msg);
    adrc_tuning->nlsef_b = mavlink_msg_adrc_tuning_get_nlsef_b(msg);
    adrc_tuning->nlsef_c = mavlink_msg_adrc_tuning_get_nlsef_c(msg);
    adrc_tuning->axis = mavlink_msg_adrc_tuning_get_axis(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_ADRC_TUNING_LEN? msg->len : MAVLINK_MSG_ID_ADRC_TUNING_LEN;
        memset(adrc_tuning, 0, MAVLINK_MSG_ID_ADRC_TUNING_LEN);
    memcpy(adrc_tuning, _MAV_PAYLOAD(msg), len);
#endif
}
